﻿namespace Geometry
{
	public struct Interval
	{
        public Interval(float start, float end)
        {
            this.Start = start;
            this.End = end;
        }

		public float Start;
		public float End;

		public float Length
		{
			get
			{
				return this.End - this.Start;
			}
		}

        public override bool Equals(object obj)
        {
            if (obj is Interval)
            {
                var other = (Interval)obj;
                return this.Start == other.Start && this.End == other.End;
            }

            return false;
        }
	}
}
